# -*- coding: utf-8 -*-
# @Time    : 2023/6/5 13:41
# @Author  : hyh
# @Email   : 935887145@qq.com
# @File    : view_fans_page.py
# @Software: PyCharm
from pages.base_page import BasePage
from appium import webdriver
from tools import driver
from appium.webdriver.common.mobileby import MobileBy as By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import  expected_conditions as EC
class ViewFansPage(BasePage):
    fans_locator = (By.XPATH,'//*[@resource-id="com.xiachufang:id/user_property_layout"]/android.widget.FrameLayout[2]/android.widget.LinearLayout[1]')
    tishi_locator = (By.XPATH,'//*[@resource-id="com.xiachufang:id/tv_load_status_major"]')

    def view_fans(self):
        self.find_element(self.fans_locator).click()  #点击粉丝
    def tishi(self):
        current_tishi = self.find_element(self.tishi_locator).get_attribute('text') #获取文本
        return current_tishi
